package top.kaoshanji.p1ch01a;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import top.kaoshanji.p1ch01a.config.KnightConfig;

/**
 * 代码清单-p1ch01a-02：AnnotationConfigApplicationContext版本的容器
 * @author kaoshanji
 * ^_^
 * create time 2025/4/22 11:22
 */
public class AnnotationApplicationContextMain {

    public static void main(String[] args) {

        ApplicationContext context = new AnnotationConfigApplicationContext(KnightConfig.class);

        Knight knight = context.getBean(Knight.class);
        knight.embarkOnQuest();
        
    }

}
